//
//  JZConfig.h
//  JieZhen
//
//  Created by zhao on 2015/3/26.
//  Copyright (c) 2015年 zhao. All rights reserved.
//

#pragma mark - ********* 头文件 ********

//#import "MBProgressHUD.h"
#import "AFHTTPSessionManager.h"
//#import "UIImageView+WebCache.h"
//#import "Constant.h"
//#import "RootTabVC.h"
//#import "ZNZButton.h"
//#import "ZNZLabel.h"
//#import "ZNZTextField.h"
//#import <AlipaySDK/AlipaySDK.h>
//#import "ZWXPayUtil.h"
//#import "AlipayUtil.h"
//#import "StringUtil.h"

//#import "Layout.h"

///友盟头文件
//#import "MobClick.h"
//#import "UMSocial.h"
//#import "UMessage.h"
//#import "UMSocialWechatHandler.h"
//#import "UMSocialQQHandler.h"
//
//#import "ShareInformView.h"

enum{
    RED_BALL,BLUE_BALL
};

/********* 数据常量 *********/
//屏幕高度
#ifndef ScreenHeight
static inline CGFloat ScreenHeight(){
    return [UIScreen mainScreen].bounds.size.height;
}
#endif
//屏幕宽度
#ifndef ScreenWidth
static inline CGFloat ScreenWidth(){
    return [UIScreen mainScreen].bounds.size.width;
}
#endif

//#define DEFAULT_TOKEN @"f789a8cdee9a30f0df9c4fe4b7c23111" // 登录用户默认访问令牌
#define SUCCESS @"00000" // 接口状态码－成功

//使用的细体字名称
#define LIGHT_FONTNAME @"Helvetica-Light"

/********* 宏函数 *********/
// 打印函数
#ifndef DLog
#ifdef DEBUG
#   define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define DLog(...)
#endif
#endif




#define SOCKET_DEBUG @"NO"

/********* http接口 *********/

//#define APP_KEY              @"test"

#define APP_KEY            arc4random_uniform(2) ? @"1ee05d90e080fafb" : @"76a96da6eb40fde3"


#define BASE_URL            @"http://api.jisuapi.com/caipiao/"

///获取彩票种类列表
#define URL_CATEGROYLIST    [BASE_URL stringByAppendingString:@"class"] // 彩票种类列表
#define URL_HSITORY                [BASE_URL stringByAppendingString:@"history"] // 彩票历史记录列表
#define URL_DETAIL                   [BASE_URL stringByAppendingString:@"query"] // 单个彩票开奖信息列表


/********* end 接口 *********/

/********* 缓存 *********/
#define GET_TOKEN           [[NSUserDefaults standardUserDefaults] stringForKey:@"token"]           // 当前登录用户accessToken
#define GET_ID              [[NSUserDefaults standardUserDefaults] stringForKey:@"ID"]              //用户id
#define GET_CUSTOMERNAME    [[NSUserDefaults standardUserDefaults] stringForKey:@"customername"]    //用户名称
#define GET_PHOTO           [[NSUserDefaults standardUserDefaults] stringForKey:@"photo"]           //用户头像URL
#define GET_MOBILE          [[NSUserDefaults standardUserDefaults] stringForKey:@"mobile"]          //用户手机
#define GET_MYCOMMENT       [[NSUserDefaults standardUserDefaults] stringForKey:@"myComment"]       //我的评论
#define GET_MYCOLLECTION    [[NSUserDefaults standardUserDefaults] stringForKey:@"myCollection"]    //我的收藏
#define GET_MYMESSAGE       [[NSUserDefaults standardUserDefaults] stringForKey:@"myMessage"]       //我的提醒
#define GET_MYWALLET        [[NSUserDefaults standardUserDefaults] stringForKey:@"myWallet"]        //我的钱包
#define GET_ACTIVITY        [[NSUserDefaults standardUserDefaults] stringForKey:@"activity"]        //活动中心
#define GET_HASH            [[NSUserDefaults standardUserDefaults] stringForKey:@"hash"]           // 是否需要更新股票库标签

#define IS_OPEN_SWITCH           ![[NSUserDefaults standardUserDefaults] boolForKey:@"is_open_switch"]      // 当前是否打开虚拟下注功能

//@"is_open_push"
#define IS_OPEN_PUSH             ![[NSUserDefaults standardUserDefaults] boolForKey:@"is_open_push"]  // 是否开启本地推送

/********* 发送通知 *********/
#define NF_CUSTOMERNAME     @"notifycustomername"       //刷新昵称
#define NF_PHONE            @"notifyphone"              //刷新电话


/****** end 缓存 ********/


///默认头像
#define PLACEHOLD_IMAGE [UIImage imageNamed:@"dfthead_100"]


/********* 常用宏 *********/
//#define debugLog(...) NSLog(__VA_ARGS__)
//#define DEBUG_TIME_START NSDate *startTime = [NSDate date]
//#define DEBUG_TIME_END NSLog(@"这段代码的执行时间: %f", -[startTime timeIntervalSinceNow])
#define RGB(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]


//#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

#define IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

#define IS_IPHONE_5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define IS_IPHONE_6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)

#define IS_IPHONE_6_Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

#define IS_IPHONE_4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

/********* key *********/
#define APIKEY      @"fd128aa3-5845-450e-8a3f-babcbd046aea"

/********* 第三方账号 *********/
// 友盟
#define UM_KEY @"572b193567e58ef62300031a"
// 微信
#define WEIXIN_APPID @"wx77d723af7ed5713e"
#define WEIXIN_APPSECRET @"b2d5ebcf0b5ed7a68913f3ed5dc60e3e"
// 新浪
#define WEIBO_APP_KEY  @"867614646"
#define WEIBO_APPSECRET @"f1b903c08ee5e37587af7d5f008d9e7d"
// QQ
#define QQ_APP_ID @"1104578129"
#define QQ_APP_KEY @"xn8wKVPeA0xjhHPd"

/********* 推送别名 *********/
#define ALIAS_TYPE @""





